package com.lazily.final_;


/**
 * @Author:  GZQ
 * @date:  2025/2/9 17:18
 * @description: final 使用练习
 */

public class FinalExercise01 {
	public static void main(String[] args) {
		Circle c1 = new Circle(5.0);
		System.out.println("面积=" + c1.calArea());
	}
}

class Circle {
	private double radius;
	public final double PI; // = 3.14;

	public Circle(double radius) {
		this.radius = radius;
		// PI = 3.14;
	}
	{
		PI = 3.14;
	}

	public double calArea() {
		return PI * radius * radius;
	}
}
